home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / nt4.0 server / NBINFO.IN_ / nbinfo.inf
INI File  |  1996-07-12  |  20KB  |  515 lines

  1. [Identification]
  2.     OptionType = NetProvider
  3. [Options]
  4.     NETBIOS
  5. [FileConstants]
  6. UtilityInf      = "UTILITY.INF"
  7. subroutineinf   = "SUBROUTN.INF"
  8. SoftwareType    = "driver"
  9. Exit_Code       = 0
  10. NetEventDLL     = "%SystemRoot%\System32\netevent.dll"
  11. IoLogMsgDLL     = "%SystemRoot%\System32\IoLogMsg.dll"
  12. Manufacturer    = "Microsoft"
  13. ProductMajorVersion     = "4"
  14. ProductMinorVersion     = "0"
  15. ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)
  16. ProductKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  17. ParamKeyName    = $(!NTN_ServiceBase)$(ProductHardwareName)"\Parameters"
  18. NbProviderField = "NbProvider"
  19. EndPointField   = "EndPoint"
  20. RouteField      = "Route"
  21. ExportField     = "Export"
  22. [GeneralConstants]
  23. from      = ""
  24. to        = ""
  25. ExitCodeOk     = 0
  26. ExitCodeCancel = 1
  27. ExitCodeFatal  = 2
  28. KeyNull         = ""
  29. MAXIMUM_ALLOWED   = 33554432
  30. RegistryErrorIndex = NO_ERROR
  31. KeyProduct      = ""
  32. KeyParameters   = ""
  33. TRUE            = 1
  34. FALSE           = 0
  35. NoTitle            = 0
  36. ExitState   = "Active"
  37. OldVersionExisted = $(FALSE)
  38. DriverPath      = $(!STF_NTPATH)\drivers
  39. [date]
  40.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  41. [Identify]
  42.     read-syms Identification
  43.     set Status     = STATUS_SUCCESSFUL
  44.     set Identifier = $(OptionType)
  45.     set Media      = #("Source Media Descriptions", 1, 1)
  46.     Return $(Status) $(Identifier) $(Media)
  47. [ReturnOptions]
  48.     set Status        = STATUS_FAILED
  49.     set OptionList     = {}
  50.     set OptionTextList = {}
  51.     set LanguageList = ^(LanguagesSupported, 1)
  52.     Ifcontains(i) $($0) in $(LanguageList)
  53.         goto returnoptions
  54.     else
  55.         set Status = STATUS_NOLANGUAGE
  56.         goto finish_ReturnOptions
  57.     endif
  58. returnoptions = +
  59.     set OptionList     = ^(Options, 1)
  60.     set OptionTextList = ^(OptionsText$($0), 1)
  61.     set Status         = STATUS_SUCCESSFUL
  62. finish_ReturnOptions = +
  63.     Return $(Status) $(OptionList) $(OptionTextList)
  64. [InstallOption]
  65.     set Status   = STATUS_FAILED
  66.     set Option   = $($1)
  67.     set SrcDir   = $($2)
  68.     set AddCopy  = $($3)
  69.     set DoCopy   = $($4)
  70.     set DoConfig = $($5)
  71.     set LanguageList = ^(LanguagesSupported, 1)
  72.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  73.         Return STATUS_NOLANGUAGE
  74.     endif
  75.     Shell "" CommonSection $(Option) $(SrcDir) $(AddCopy) $(DoCopy) $(DoConfig)
  76.     set Status = $($R0)
  77.     Return $(Status)
  78. [BindingsReview]
  79.     set Option   = $($1)
  80.     set SrcDir   = $($2)
  81.     set AddCopy  = $($3)
  82.     set DoCopy   = $($4)
  83.     set DoConfig = $($5)
  84.     Shell "" CommonSection $(Option) $(SrcDir) $(AddCopy) $(DoCopy) $(DoConfig)
  85.     set Status = $($R0)
  86.     Return $(Status)
  87. [CommonSection]
  88.     StartWait
  89.     set Option   = $($1)
  90.     set SrcDir   = $($2)
  91.     set AddCopy  = $($3)
  92.     set DoCopy   = $($4)
  93.     set DoConfig = $($5)
  94.     set-subst LF = "\n"
  95.     read-syms GeneralConstants
  96.     read-syms FileConstants
  97.     read-syms DialogConstants$(!STF_LANGUAGE)
  98.     read-syms FileConstants$(!STF_LANGUAGE)
  99.     detect date
  100.     set-title  $(FunctionTitle)
  101.     set to   = Begin
  102.     set from = Begin
  103.     set CommonStatus = STATUS_SUCCESSFUL
  104. Begin = +
  105.     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase) $(MAXIMUM_ALLOWED) ServiceKey
  106.     Ifstr $(ServiceKey) == $(KeyNull)
  107.         set RegistryErrorIndex = $($R0)
  108.         goto fatalregistry
  109.     endif
  110.     Set RouteInformationList = {}
  111.     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\NetBIOS\Linkage" $(MAXIMUM_ALLOWED) NbKey
  112.     Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  113.         Debug-Output "NBINFO.INF: could not open CurrentControlSet\Services\NetBIOS\Linkage key"
  114.         goto successful
  115.     Endif
  116.     GetRegValue $(NbKey) Route RouteListValue
  117.     Ifint $(RegLastError) != 0
  118.         Debug-Output "NBINFO.INF: Error reading NetBIOS\Linkage:Route value: "$(RegLastError)
  119.         Set RouteList = {}
  120.     Else
  121.         Set RouteList = *($(RouteListValue),4)
  122.     Endif
  123.     set ActiveRouteList = $(RouteList)
  124.     ForListDo $(RouteList)
  125.         Debug-Output "NBINFO.INF: Adding NetBIOS route value: "$($)
  126.         Set RouteInformationList = >($(RouteInformationList),$($))
  127.     EndForListDo
  128.     OpenRegKey $(NbKey) "" "Disabled" $(MAXIMUM_ALLOWED) NbDisKey
  129.     Ifstr(i) $(NbDisKey) != $(KeyNull)
  130.         Set RouteList = {}
  131.         GetRegValue $(NbDisKey) Route RouteListValue
  132.         Ifint $(RegLastError) == 0
  133.             Set RouteList = *($(RouteListValue),4)
  134.         Endif
  135.         ForListDo $(RouteList)
  136.             Debug-Output "NBINFO.INF: Adding DISABLED NetBIOS route value: "$($)
  137.             Set RouteInformationList = >($(RouteInformationList),$($))
  138.         EndForListDo
  139.         CloseRegKey $(NbDisKey)
  140.     Endif
  141.     CloseRegKey $(NbKey)
  142.     Debug-Output "NBINFO.INF: open N/B info service"
  143.     OpenRegKey $(ServiceKey) "" "NetBIOSInformation" $(MAXIMUM_ALLOWED) NetBIOSKey
  144.     Ifstr(i) $(NetBIOSKey) == ""
  145.         Shell $(UtilityInf), CreateService, "NetBIOSInformation", "NetBIOSInformation", "", "adapter", "", {}, ""
  146.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  147.             Debug-Output "NBINFO.INF: Shell error creating service"
  148.             goto ShellCodeError
  149.         endif
  150.         set RegistryErrorIndex = $($R0)
  151.         Set ParameterKey = $($R2)
  152.         CloseRegKey $($R1)
  153.         CloseRegKey $($R3)
  154.     Else
  155.         OpenRegKey $(NetBIOSKey) "" "Linkage" $(MAXIMUM_ALLOWED) LinkageKey
  156.         Ifstr(i) $(LinkageKey) == $(KeyNull)
  157.             CreateRegKey $(NetBIOSKey) { "Linkage", $(NoTitle), GenericClass } "" $(MAXIMUM_ALLOWED) "" LinkageKey
  158.         Endif
  159.         CloseRegKey $(LinkageKey)
  160.         OpenRegKey $(NetBIOSKey) "" "Parameters" $(MAXIMUM_ALLOWED) ParameterKey
  161.         Ifstr(i) $(ParameterKey) == $(KeyNull)
  162.             CreateRegKey $(NetBIOSKey) { "Parameters", $(NoTitle), GenericClass } "" $(MAXIMUM_ALLOWED) "" ParameterKey
  163.         Endif
  164.         CloseRegKey $(NetBIOSKey)
  165.     Endif
  166.     Ifstr(i) $(ParameterKey) == $(KeyNull)
  167.         read-syms FatalError1$(!STF_LANGUAGE)
  168.         goto fatal
  169.     Endif
  170.     GetRegValue $(ParameterKey) "Route" OrigRouteValue
  171.     Ifint $(RegLastError) == 0
  172.         Set OrigRouteList = *($(OrigRouteValue), 4)
  173.         ifstr(i) $(OrigRouteList) == ""
  174.             set OrigRouteList = {}
  175.         Endif
  176.         Set OrigIndex = 0
  177.         Set NewIndex = 0
  178.         Set AnyChanges = 0
  179.         Set CurrentRouteList = {}
  180.         Set NewValueList = {}
  181.         ForListDo $(OrigRouteList)
  182.             Set-add OrigIndex = $(OrigIndex),1
  183.             Set ThisOrigRoute = $($)
  184.             ifContains(i) $(ThisOrigRoute) NOT-IN $(RouteInformationList)
  185.                 Debug-Output "NBINFO.INF: Removing info for old route: "$(ThisOrigRoute)", index "$(OrigIndex)
  186.                 DeleteRegValue $(ParameterKey) LanaNum$(OrigIndex)
  187.                 DeleteRegValue $(ParameterKey) EnumExport$(OrigIndex)
  188.                 Set AnyChanges = 1
  189.             Else
  190.                 Set CurrentRouteList = >($(CurrentRouteList),$(ThisOrigRoute))
  191.                 Set-add NewIndex = $(NewIndex),1
  192.                 GetRegValue $(ParameterKey) LanaNum$(OrigIndex) OrigLanaValue
  193.                 Set OrigLanaNum = *($(OrigLanaValue),4)
  194.                 GetRegValue $(ParameterKey) EnumExport$(OrigIndex) OrigExportValue
  195.                 Set OrigExport = *($(OrigExportValue),4)
  196.                 set NewValueList = >($(NewValueList),{LanaNum$(NewIndex), $(NoTitle), $(!REG_VT_DWORD), $(OrigLanaNum) })
  197.                 set NewValueList = >($(NewValueList),{EnumExport$(NewIndex), $(NoTitle), $(!REG_VT_DWORD), $(OrigExport)})
  198.             Endif
  199.         EndForListDo
  200.         Ifint $(AnyChanges) != 0
  201. DeleteNextOldLana = +
  202.             Ifint $(NewIndex) <= $(OrigIndex)
  203.                 Debug-Output "NBINFO.INF: pruning old lana info for index = "$(NewIndex)
  204.                 DeleteRegValue $(ParameterKey) LanaNum$(NewIndex)
  205.                 DeleteRegValue $(ParameterKey) EnumExport$(NewIndex)
  206.                 Set-add NewIndex = $(NewIndex),1
  207.                 Goto DeleteNextOldLana
  208.             Endif
  209.             Debug-Output "NBINFO.INF: updating Route, LanaNumX and EnumExportX after pruning"
  210.             Set NewValueList = >($(NewValueList),{Route, $(NoTitle), $(!REG_VT_MULTI_SZ), $(CurrentRouteList)})
  211.             Shell $(UtilityInf), AddValueList, $(ParameterKey), $(NewValueList)
  212.         Endif
  213.     Endif
  214.     Debug-Output "NBINFO.INF: Access N/B info route data"
  215.     GetRegValue $(ParameterKey) "Route" OldRouteValue
  216.     set OldRouteList = *($(OldRouteValue), 4)
  217.     ifstr(i) $(OldRouteList) == ""
  218.         set OldRouteList = {}
  219.     Endif
  220.     Debug-Output "NBINFO.INF: Enumerate N/B info lananums"
  221.     EnumRegValue $(ParameterKey) ParameterValue
  222.     Set HighLana = 0
  223.     set UsedLanaNum = {}
  224.     ForListDo $(ParameterValue)
  225.         set LanaNumName = *($($), 1)
  226.         Set LanaNumNum = *($($), 4)
  227.         LibraryProcedure Result $(!LIBHANDLE) SetupStrncmp $(LanaNumName) "LanaNum" 7
  228.         ifint $(Result) == 0
  229.             Ifint $(HighLana) < $(LanaNumNum)
  230.                 Set HighLana = $(LanaNumNum)
  231.             Endif
  232.             set UsedLanaNum = >($(UsedLanaNum),$(LanaNumNum))
  233.             ifint $(LanaNumNum) == 0
  234.                 set LanaZeroNum = $(LanaNumName)
  235.             endif
  236.             Set Rpc$(LanaNumName) = $(LanaNumNum)
  237.         endif
  238.     EndForListDo
  239.     Set NewValueList = {}
  240.     Set RpcLanaList = {}
  241.     Set RpcProtoList = {}
  242.     QueryListSize Position $(OldRouteList)
  243.     Set LanaNum = 0
  244.     Set AnyChanges = 0
  245.     Set LanaXnsNum = ""
  246.     ForListDo $(RouteInformationList)
  247.         Set ThisRoute = $($)
  248.         ifContains(i) $(ThisRoute) NOT-IN $(OldRouteList)
  249.             Debug-Output "NBINFO.INF: New route to be added: "$(ThisRoute)
  250.             Set-add Position = $(Position), 1
  251.             Set OldRouteList = >($(OldRouteList), $(ThisRoute))
  252.             Set AnyChanges = 1
  253. TryAgain = +
  254.             ifContains(i) $(LanaNum) IN $(UsedLanaNum)
  255.                 set-add LanaNum = $(LanaNum), 1
  256.                 goto TryAgain
  257.             else
  258.                 ifint $(LanaNum) == 0
  259.                     set LanaZeroNum = "LanaNum"$(Position)
  260.                 endif
  261.                 Debug-Output "NBINFO.INF: LanaNum "$(LanaNum)" assigned to "$(ThisRoute)
  262.                 set NewValueList = >($(NewValueList),{LanaNum$(Position), $(NoTitle), $(!REG_VT_DWORD), $(LanaNum) })
  263.                 set NewValueList = >($(NewValueList),{EnumExport$(Position), $(NoTitle), $(!REG_VT_DWORD), 1})
  264.                 set UsedLanaNum = >($(UsedLanaNum), $(LanaNum))
  265.                 Set RpcLanaNum$(Position) = $(LanaNum)
  266.                 Ifint $(HighLana) < $(LanaNum)
  267.                     Set HighLana = $(LanaNum)
  268.                 Endif
  269.                 set-add LanaNum = $(LanaNum), 1
  270.             endif
  271.             set FLibraryErrCtl = 1
  272.             LibraryProcedure Result $(!NCPA_HANDLE) EqualToXnsRoute $(ThisRoute)
  273.             ifstr(i) $(Result) == "1"
  274.                 set LanaXnsNum = "LanaNum"$(Position)
  275.             endif
  276.         endif
  277.         Set RouteIndex = ~($(OldRouteList),$(ThisRoute))
  278.         Set ThisLana = $(RpcLanaNum$(RouteIndex))
  279.         LibraryProcedure CEPSTemp $(!NCPA_HANDLE) CPlSetup $(!STF_HWND), ROUTETOLIST, $(ThisRoute)
  280.         Set ThisProto = ""
  281.         Set ThisService = *($(CEPSTemp),2)
  282.         Debug-Output "NBINFO.INF: CEPS: "$(ThisRoute)" = "$(CEPSTemp)", ThisService = "$(ThisService)
  283.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(ThisService)"\Parameters" $(!REG_KEY_READ) SrvParmKey
  284.         Ifint $(RegLastError) == 0
  285.             GetRegValue $(SrvParmKey) $(NbProviderField) NbProviderData
  286.             Ifint $(RegLastError) == 0
  287.                 Set ThisProto = *($(NbProviderData),4)
  288.                 Debug-Output "NBINFO.INF: Service "$(ThisService)" is a NetBIOS provider: "$(ThisProto)
  289.                 Set RpcSuffixCount$(ThisProto) = 0
  290.                 Set RpcLanaList  = >($(RpcLanaList),$(ThisLana))
  291.                 Set RpcProtoList = >($(RpcProtoList),$(ThisProto))
  292.             Else
  293.                 Debug-Output "NBINFO.INF: "$(ThisService)"\Parameters has no NbProvider value"
  294.             Endif
  295.             CloseRegKey $(SrvParmKey)
  296.         Else
  297.             Debug-Output "NBINFO.INF: open of key "$(ThisService)"\Parameters FAILED; no provider info"
  298.         Endif
  299.         Debug-Output "NBINFO.INF: RPC string for route "$(ThisRoute)" is "$(ThisProto)" = "$(ThisLana)
  300.     EndForListDo
  301.     Ifint $(AnyChanges) != 0
  302.         Debug-Output "NBINFO.INF: Update Parameters..."
  303.         Set NewValueList = >($(NewValueList),{Route, $(NoTitle), $(!REG_VT_MULTI_SZ), $(OldRouteList)})
  304.         Shell $(UtilityInf), AddValueList, $(ParameterKey), $(NewValueList)
  305.     Endif
  306.     set ExportNum = 1
  307.     ForListDo $(OldRouteList)
  308.         Set ThisRoute = *($($),1)
  309.         Set ThisProto = *($($),2)
  310.         LibraryProcedure "" $(!NCPA_HANDLE) SetEnumExport $(ExportNum) $(ThisRoute)
  311.         set-add ExportNum = $(ExportNum), 1
  312.     EndForListDo
  313.     ifstr(i) $(LanaXnsNum) != ""
  314.         GetRegValue $(ParameterKey) $(LanaXnsNum) LanaXnsInfo
  315.         GetRegValue $(ParameterKey) $(LanaZeroNum) LanaZeroInfo
  316.         set XnsNum = *($(LanaXnsInfo), 4)
  317.         set ZeroNum = *($(LanaZeroInfo), 4)
  318.         SetRegValue $(ParameterKey) {$(LanaXnsNum),$(NoTitle),$(!REG_VT_DWORD),$(ZeroNum)}
  319.         SetRegValue $(ParameterKey) {$(LanaZeroNum),$(NoTitle),$(!REG_VT_DWORD),$(XnsNum)}
  320.     Endif
  321.     CloseRegKey $(ParameterKey)
  322.     set FLibraryErrCtl = 1
  323.     LibraryProcedure "" $(!NCPA_HANDLE), CPlSetupLanaMap
  324.     EndWait
  325.     OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\Microsoft\Rpc" $(MAXIMUM_ALLOWED) KeyRpc
  326.     Ifstr(i) $(KeyRpc) == ""
  327.         Debug-Output "NBINFO.INF: Unable to open RPC software key"
  328.         goto successful
  329.     Endif
  330.     Set RpcValueList = {}
  331.     Set NextLana = 0
  332.     OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Services\NetBIOS\Linkage" $(MAXIMUM_ALLOWED) NetBiosLinkage
  333.     ifstr(i) $(NetBiosLinkage) != ""
  334.         GetRegValue $(NetBiosLinkage) "LanaMap" LanaMapInfo
  335.         set BindedLana = {}
  336.         set Odd = 1
  337.         ForListDo *($(LanaMapInfo),4)
  338.             ifint $(Odd) == 1
  339.                 set Odd = 0
  340.             else
  341.                 set Odd = 1
  342.                 ifstr $(BindedLana) == {}
  343.                     set BindedLana = $($)
  344.                 else
  345.                     set BindedLana = >($(BindedLana),$($))
  346.                 endif
  347.             endif
  348.         EndForListDo
  349.         CloseRegKey $(NetBiosLinkage)
  350.     endif
  351. trynextlana = +
  352.     Debug-Output "Binded Lana:"$(BindedLana)
  353.     Debug-Output "NBINFO.INF: HighLana = "$(HighLana)", LanaXnsNum = "$(LanaXnsNum)", XnsNum = "$(XnsNum)", ZeroNum = "$(ZeroNum)
  354.     Ifint $(NextLana) > $(HighLana)
  355.         goto updaterpc
  356.     Endif
  357.     Ifcontains(i) $(NextLana) in $(RpcLanaList)
  358.         Set Index = ~($(RpcLanaList),$(NextLana))
  359.         Set ThisProto = *($(RpcProtoList),$(Index))
  360.         Set NextSuffix = $(RpcSuffixCount$(ThisProto))
  361.         Set-add RpcSuffixCount$(ThisProto) = $(NextSuffix),1
  362.         Set ThisString = "ncacn_nb"$(ThisProto)$(NextSuffix)
  363.         Set UseLana = $(NextLana)
  364.         Ifstr(i) $(LanaXnsNum) != ""
  365.             Ifint $(NextLana) == $(XnsNum)
  366.                 Set UseLana = $(ZeroNum)
  367.             Else-ifint $(NextLana) == $(ZeroNum)
  368.                 Set UseLana = $(XnsNum)
  369.             Endif
  370.         Endif
  371.         Debug-Output "NBINFO.INF: RPC string = "$(ThisString)", lana = "$(UseLana)
  372.         ifcontains(i) $(UseLana) in $(BindedLana)
  373.             Set RpcValueList = >($(RpcValueList),{$(ThisString),$(NoTitle),$(!REG_VT_DWORD),$(UseLana)})
  374.         endif
  375.     Endif
  376.     Set-add NextLana = $(NextLana),1
  377.     Goto trynextlana
  378. updaterpc = +
  379.     Set KeyNameNetBios = "NetBios"
  380.     DeleteRegKey $(KeyRpc) $(KeyNameNetBios)
  381.     CreateRegKey $(KeyRpc) { $(KeyNameNetBios), $(NoTitle), GenericClass } "" $(MAXIMUM_ALLOWED) "" KeyNetBios
  382.     Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  383.         Debug-Output "NBINFO.INF: RpcValueList = "$(RpcValueList)
  384.         Shell $(UtilityInf), AddValueList, $(KeyNetBios), $(RpcValueList)
  385.         CloseRegKey $(KeyNetBios)
  386.     Else
  387.         Debug-Output "NBINFO.INF:  Rpc\Netbios key recreation failed"
  388.     Endif
  389.     CloseRegKey $(KeyRpc)
  390.     goto successful
  391. successful = +
  392.      goto end
  393. warning = +
  394.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  395.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  396.         goto ShellCodeError
  397.     endif
  398.     ifstr(i) $($R1) == "OK"
  399.         goto $(to)
  400.     else-ifstr(i) $($R1) == "CANCEL"
  401.         goto $(from)
  402.     else
  403.         goto "end"
  404.     endif
  405. nonfatal = +
  406.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "NONFATAL", $(Error)
  407.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  408.         goto ShellCodeError
  409.     endif
  410.     ifstr(i) $($R1) == "OK"
  411.         goto $(from)
  412.     else
  413.         goto "end"
  414.     endif
  415. fatalregistry = +
  416.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  417.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  418.         goto ShellCodeError
  419.     endif
  420.     set Error = $($R0)
  421.     goto fatal
  422. fatal = +
  423.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  424.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  425.         goto ShellCodeError
  426.     endif
  427.     goto setfailed
  428. ShellCodeError = +
  429.     set DlgType      = "MessageBox"
  430.     set STF_MB_TITLE = $(ShellCodeErrorTitle)
  431.     set STF_MB_TEXT  = $(ShellCodeErrorText)
  432.     set STF_MB_TYPE  = 1
  433.     set STF_MB_ICON  = 3
  434.     set STF_MB_DEF   = 1
  435.     ui start "Error Message"
  436.     goto setfailed
  437. setfailed = +
  438.     set CommonStatus = STATUS_FAILED
  439.     goto end
  440. end = +
  441.     goto term
  442. term = +
  443.     Return $(CommonStatus)
  444. [CheckMixRpcProtocol]
  445.     read-syms GeneralConstants
  446.     read-syms FileConstants
  447.     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\NetBIOS\Linkage" $(MAXIMUM_ALLOWED) NbKey
  448.     Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  449.         goto CheckMixRpcProtocolReturn 
  450.     endif
  451.     GetRegValue $(NbKey) Route RouteListValue
  452.     Ifint $(RegLastError) != 0
  453.         Debug-Output "NBINFO.INF: Error reading NetBIOS\Linkage:Route value: "$(RegLastError)
  454.         Set RouteList = {}
  455.     Else
  456.         Set RouteList = *($(RouteListValue),4)
  457.     Endif
  458.     set ActiveRouteList = $(RouteList)
  459.     set CheckedProtocol = """"$($0)""""
  460.     set-add Length      = $($1),2
  461.     set AddedProtocol   = $($2)
  462.     set AddedRpcString  = $($3)
  463.     set AddedClientDLL  = $($4)
  464.     set AddedServerDLL  = $($5)
  465.     set Find = 0
  466.     ForListDo $(ActiveRouteList)
  467.         LibraryProcedure Result $(!LIBHANDLE) SetupStrncmp $($) $(CheckedProtocol) $(Length)
  468.         ifint $(Result) == 0
  469.             set Find = 1
  470.             goto FindIt
  471.         endif
  472.     EndForListDo
  473. FindIt = +
  474.     ifint $(Find) == 1
  475.         Shell $(UtilityInf) AddMixRpcProtocol "Netbios" $(AddedProtocol) $(AddedRpcString) $(AddedClientDLL) $(AddedServerDLL) 
  476.     else
  477.         Shell $(UtilityInf) RemoveRpcProtocol $(AddedRpcString)
  478.     endif
  479. CheckMixRpcProtocolReturn = +
  480.     return
  481. [Source Media Descriptions]
  482.     1 = "Windows NT Server CD-ROM", TAGFILE = cdrom_s.40
  483. [Signature]
  484.     FileType = MICROSOFT_FILE
  485. [GetSignature]
  486.     read-syms Signature
  487.     return $(FileType)
  488. [ProductType]
  489. STF_PRODUCT  = LanmanNT
  490. STF_PLATFORM = I386
  491. [Files-Inf]
  492. 2,    oemsetup.inf,     SIZE=1000,    RENAME=$(!UG_Filename)
  493. [LanguagesSupported]
  494.     ENG
  495. [OptionsTextENG]
  496.     NETBIOS     = "NETBIOS provider"
  497. [FileConstantsENG]
  498. ProCaption   = "Windows NT Setup"
  499. ProCancel    = "Cancel"
  500. ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  501.                "Are you sure you want to cancel copying files?"
  502. ProCancelCap = "Network Setup Message"
  503. ProText1     = "Copying:"
  504. ProText2     = "To:"
  505. ShellCodeErrorTitle     = "Error: NETBIOS Provider"
  506. ShellCodeErrorText      = "Shell Code Error."
  507. [DialogConstantsENG]
  508. Help        = "&Help"
  509. Exit        = "Cancel"
  510. OK          = "OK"
  511. HelpContext = ""
  512. Continue    = "Continue"
  513. Cancel      = "Cancel"
  514. [FileDependentDlgENG]
  515.